<nav id="nav" class="nav nav-main">
    <div class="fleft site-name"><a href="{cfg name='path.root.web'}">{cfg name='view.name'}</a></div>
    <div class="fleft">
        <ul class="nav nav-main">
            {hook run='main_menu'}
            {hook run='main_menu_item'}
        </ul>
    </div>
    <div class="fright">
        <div class="fleft">
            <form action="{router page='search'}topics/" class="search">
                <input type="text" placeholder="{$aLang.search}" maxlength="255" name="q" class="input-text">
                <input type="submit" value="" title="{$aLang.search_submit}" class="input-submit icon icon-search">
            </form>
        </div>
        <div class="fleft">
            <ul class="nav nav-userbar">
                {hook run='userbar_nav'}
                {if $oUserCurrent}
                    <li class="nav-userbar-username left">
                        <div id="account-head-link">
                            <a href="{$oUserCurrent->getUserWebPath()}" class="username">
                                <img src="{$oUserCurrent->getProfileAvatarPath(24)}" alt="avatar" class="avatar" />
                                {$oUserCurrent->getLogin()}
                            </a>
                        </div>
                        <div class="js-account-menu-show">
                            <ul>
                                <li><a href="{router page='topic'}add/" class="write" id="modal_write_show">{$aLang.block_create}</a></li>
                                <li><a href="{$oUserCurrent->getUserWebPath()}favourites/topics/">{$aLang.user_menu_profile_favourites}</a></li>
                                <li><a href="{router page='talk'}" {if $iUserCurrentCountTalkNew}class="new-messages"{/if} id="new_messages" title="{if $iUserCurrentCountTalkNew}{$aLang.user_privat_messages_new}{/if}">{$aLang.user_privat_messages}{if $iUserCurrentCountTalkNew} ({$iUserCurrentCountTalkNew}){/if}</a></li>
                                <li><a href="{router page='settings'}profile/">{$aLang.user_settings}</a></li>
                                {hook run='userbar_item'}
                                <li><a href="{router page='login'}exit/?security_ls_key={$LIVESTREET_SECURITY_KEY}">{$aLang.exit}</a></li>
                            </ul>
                        </div>
                    </li>
                {else}
                    {hook run='userbar_item'}
                    <li class="left"><a href="{router page='login'}" class="js-login-form-show">{$aLang.user_login_submit}</a></li>
                    <li class="left"><a href="{router page='registration'}" class="js-registration-form-show">{$aLang.registration_submit}</a></li>
                {/if}
            </ul>
        </div>
    </div>
</nav>